package com.s20y.register.config.es.repository;

import com.s20y.register.config.es.model.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

public interface UserRepository extends
		PagingAndSortingRepository<User, Integer> {
	@Query("{\"multi_match\":{\"query\":\"?0\",\"fields\":[\"summary\",\"name\",\"screenName\"]}}")
	Page<User> findBySummary(String text, Pageable pageable);
}
